//
//  WJJCalendarView.h
//  WJJCalendarView
//
//  Created by JunWang on 16/3/7.
//  Copyright (c) 2016年 Insigma Hengtian Software Co.,Ltd  All rights reserved.
//



#import "WJJCalendarRange.h"
#import "NSDate+WJJCalendarView.h"
@protocol DSLCalendarViewDelegate;


@interface WJJCalendarView : UIView

@property (nonatomic, weak) id<DSLCalendarViewDelegate>delegate;
@property (nonatomic, copy) NSDateComponents *visibleMonth;
@property (nonatomic, strong) WJJCalendarRange *selectedRange;

+ (Class)monthSelectorViewClass;
+ (Class)monthViewClass;
+ (Class)dayViewClass;

- (void)setVisibleMonth:(NSDateComponents *)visibleMonth animated:(BOOL)animated;

@end


@protocol DSLCalendarViewDelegate <NSObject>

@optional
- (void)calendarView:(WJJCalendarView*)calendarView didSelectRange:(WJJCalendarRange*)range;
- (void)calendarView:(WJJCalendarView *)calendarView willChangeToVisibleMonth:(NSDateComponents*)month duration:(NSTimeInterval)duration;
- (void)calendarView:(WJJCalendarView *)calendarView didChangeToVisibleMonth:(NSDateComponents*)month;
- (WJJCalendarRange*)calendarView:(WJJCalendarView*)calendarView didDragToDay:(NSDateComponents*)day selectingRange:(WJJCalendarRange*)range;
- (BOOL)calendarView:(WJJCalendarView *)calendarView shouldAnimateDragToMonth:(NSDateComponents*)month;

@end
